-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sessionctx, executor: add session var to control explicit insertion on auto_random column #17102
sessionctx, executor: add session var to control explicit insertion on auto_random column #17102
Conversation
…random column is allowed
Codecov Report
@@ Coverage Diff @@
## master #17102 +/- ##
===========================================
Coverage 79.9121% 79.9121%
===========================================
Files 520 520
Lines 140269 140269
===========================================
Hits 112092 112092
Misses 19217 19217
Partials 8960 8960 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title and PR description are all about implicit insertion
but the code is all explicit insertion
. Please modify the PR title and description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why session variable, not global variable?
@djshow832 Although I think the case is rare, imagine there are two sessions: Global variable cannot meet the demand. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
/run-all-tests |
/run-cherry-picker |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.1 in PR #17436 |
Added by pingcap/tidb#17102 default is false, must enable for insert value explicit, or can't replicate.
* Enable allow_auto_random_explicit_insert if it's suppported Added by pingcap/tidb#17102 default is false, must enable for insert value explicit, or can't replicate.
) * Enable allow_auto_random_explicit_insert if it's suppported Added by pingcap/tidb#17102 default is false, must enable for insert value explicit, or can't replicate.
) * Enable allow_auto_random_explicit_insert if it's suppported Added by pingcap/tidb#17102 default is false, must enable for insert value explicit, or can't replicate.
…n auto_random column (pingcap#17102)
What problem does this PR solve?
Problem Summary:
As the documentation says,
This PR adds a session variable named
tidb_allow_auto_random_explicit_insert
, which controls whether explicit insertion on auto_random column is allowed. By default, it isfalse
.What is changed and how it works?
What's Changed:
tidb_allow_auto_random_explicit_insert
.Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects
Release note
tidb_allow_auto_random_explicit_insert
is added, which controls whether explicit insertion on auto_random column is allowed.